Create Table quarters(
[q_id] [int] NOT NULL,
[q_name] [varchar](30) NOT NULL,
primary key("q_id")
);

INSERT [dbo].[quarters] ( [q_id], [q_name]) VALUES (1, N'保利名都');
INSERT [dbo].[quarters] ( [q_id], [q_name]) VALUES (2, N'十里景秀');

Create Table buildings(
[b_id] [int] NOT NULL,
[b_name] [varchar](30) NOT NULL,
[q_id] [int] NOT NULL,
[q_name] [varchar](30) NOT NULL,
primary key("b_id")
);

INSERT [dbo].[buildings] ( [b_id], [b_name],[q_id], [q_name]) VALUES (1, N'一号楼',1,'保利名都');
INSERT [dbo].[buildings] ( [b_id], [b_name],[q_id], [q_name]) VALUES (2, N'二号楼',1,'保利名都');
INSERT [dbo].[buildings] ( [b_id], [b_name],[q_id], [q_name]) VALUES (3, N'三号楼',1,'保利名都');
INSERT [dbo].[buildings] ( [b_id], [b_name],[q_id], [q_name]) VALUES (4, N'四号楼',1,'保利名都');
INSERT [dbo].[buildings] ( [b_id], [b_name],[q_id], [q_name]) VALUES (5, N'五号楼',1,'保利名都');
INSERT [dbo].[buildings] ( [b_id], [b_name],[q_id], [q_name]) VALUES (6, N'一号楼',2,'十里景秀');
INSERT [dbo].[buildings] ( [b_id], [b_name],[q_id], [q_name]) VALUES (7, N'二号楼',2,'十里景秀');
INSERT [dbo].[buildings] ( [b_id], [b_name],[q_id], [q_name]) VALUES (8, N'三号楼',2,'十里景秀');
INSERT [dbo].[buildings] ( [b_id], [b_name],[q_id], [q_name]) VALUES (9, N'四号楼',2,'十里景秀');
INSERT [dbo].[buildings] ( [b_id], [b_name],[q_id], [q_name]) VALUES (10, N'五号楼',2,'十里景秀');



Create Table owner_info(
[owner_id] [int] IDENTITY(1,1) NOT NULL, 
[householder] [varchar](20) NOT NULL,
[id_number] [varchar](20) NOT NULL,
[phone] [varchar](15) NOT NULL,
[b_id] [int] NOT NULL,
[b_name] [varchar](30) NOT NULL,
[q_id] [int] NOT NULL,
[q_name] [varchar](30) NOT NULL,
[room_num] [varchar](10) NOT NULL,
[gender] [int] NOT NULL,
[credentials_img_1] [varchar](50) NOT NULL,
[credentials_img_2] [varchar](50) NOT NULL,
[description] [varchar](200) NULL,
[state] [int] NOT NULL,
[modify_time] [datetime] NOT NULL,
[user_id][int] NOT NULL,
[user_name] [varchar](50) NOT NULL
primary key("owner_id")
);

INSERT [dbo].[owner_info] ( [householder],[id_number],[phone],[b_id], [b_name], [q_id], [q_name],[room_num],[gender],[credentials_img_1],[credentials_img_2],[description],[state],[modify_time],[user_id],[user_name]) VALUES (N'张三', N'210811196005132133',N'19012345678',1,N'一号楼',1,N'保利名都',N'2601',1,N'',N'',N'',1, CAST(N'2024-04-23T20:00:00.000' AS DateTime), 2024001, N'admin');

INSERT [dbo].[owner_info] ( [householder],[id_number],[phone],[b_id], [b_name], [q_id], [q_name],[room_num],[gender],[credentials_img_1],[credentials_img_2],[description],[state],[modify_time],[user_id],[user_name]) VALUES (N'李四', N'210811196005132133',N'19012345678',1,N'一号楼',1,N'保利名都',N'2601',1,N'',N'',N'',1, CAST(N'2024-04-23T20:00:00.000' AS DateTime), 2024001, N'admin');

INSERT [dbo].[owner_info] ( [householder],[id_number],[phone],[b_id], [b_name], [q_id], [q_name],[room_num],[gender],[credentials_img_1],[credentials_img_2],[description],[state],[modify_time],[user_id],[user_name]) VALUES (N'王五', N'210811196005132133',N'19012345678',2,N'二号楼',1,N'保利名都',N'2701',0,N'',N'',N'',0, CAST(N'2024-04-23T20:00:00.000' AS DateTime), 2024001, N'admin');

INSERT [dbo].[owner_info] ( [householder],[id_number],[phone],[b_id], [b_name], [q_id], [q_name],[room_num],[gender],[credentials_img_1],[credentials_img_2],[description],[state],[modify_time],[user_id],[user_name]) VALUES (N'赵六', N'210811196005132133','19012345678',3,N'三号楼',1,N'保利名都',N'2601',0,N'',N'',N'',1, CAST(N'2024-04-23T20:00:00.000' AS DateTime), 2024001, N'admin');

INSERT [dbo].[owner_info] ( [householder],[id_number],[phone],[b_id], [b_name], [q_id], [q_name],[room_num],[gender],[credentials_img_1],[credentials_img_2],[description],[state],[modify_time],[user_id],[user_name]) VALUES (N'路人甲', N'210811196005132133','19012345678',6,N'一号楼',2,N'十里景秀',N'一单元1102',0,N'',N'',N'',1, CAST(N'2024-04-23T20:00:00.000' AS DateTime), 2024001, N'admin');

INSERT [dbo].[owner_info] ( [householder],[id_number],[phone],[b_id], [b_name],[q_id], [q_name],[room_num],[gender],[credentials_img_1],[credentials_img_2],[description],[state],[modify_time],[user_id],[user_name]) VALUES (N'路人乙', N'210811196005132133','19012345678',6,N'一号楼',2,N'十里景秀',N'一单元1102',0,N'',N'',N'',1, CAST(N'2024-04-23T20:00:00.000' AS DateTime), 2024001, N'admin');

INSERT [dbo].[owner_info] ( [householder],[id_number],[phone],[b_id], [b_name], [q_id], [q_name],[room_num],[gender],[credentials_img_1],[credentials_img_2],[description],[state],[modify_time],[user_id],[user_name]) VALUES (N'路人丁', N'210811196005132133','19012345678',6,N'一号楼',2,N'十里景秀',N'一单元1102',0,N'',N'',N'',1, CAST(N'2024-04-23T20:00:00.000' AS DateTime), 2024001, N'admin');

INSERT [dbo].[owner_info] ( [householder],[id_number],[phone],[b_id], [b_name], [q_id], [q_name],[room_num],[gender],[credentials_img_1],[credentials_img_2],[description],[state],[modify_time],[user_id],[user_name]) VALUES (N'路人丙', N'210811196005132133','19012345678',8,N'三号楼',2,N'十里景秀',N'二单元901',0,N'',N'',N'',0, CAST(N'2024-04-23T20:00:00.000' AS DateTime), 2024001, N'admin');

